Skip to content

Bound wallet HTTP bridge requests - #51

Closed
ty-everett wants to merge 1 commit into
masterfrom
codex/wallet-http-timeouts
Closed

Bound wallet HTTP bridge requests#51
ty-everett wants to merge 1 commit into
masterfrom
codex/wallet-http-timeouts

Conversation

@ty-everett

Copy link
Copy Markdown
Collaborator

Summary

  • wrap wallet HTTP bridge calls with a bounded timeout
  • return HTTP 504 with code WALLET_REQUEST_TIMEOUT when a wallet call does not complete
  • add an onWalletReady regression for a hung getPublicKey request
  • dedupe @bsv/sdk for @bsv/wallet-toolbox-client so the renderer build gate is runnable

Validation

  • npm ci
  • npm ls @bsv/sdk @bsv/wallet-toolbox-client --depth=2
  • npx vitest run --config vitest.config.electron.ts test/onWalletReady.test.ts
  • npm run build

Why

Builder apps should not hang indefinitely when a wallet permission flow or method call does not resolve. The SDK dedupe also fixes the current TypeScript build break from duplicate LookupResolver private types.

Copy link
Copy Markdown
Collaborator Author

Closing this PR intentionally.

The timeout-based approach here is no longer the desired wallet behavior. A blanket WALLET_REQUEST_TIMEOUT around wallet methods conflicts with the actual permission contract: if permission is missing, the wallet should prompt and the original request should wait for the user's Grant/Deny decision. We validated and merged that corrected direction in p2ppsr/metanet-client-desktop#26, including removal of the same 60s wallet-method timeout.

The useful part of this PR is the @bsv/sdk dedupe/build fix, but it should come back separately if BSV Desktop still needs it. The wallet bridge behavior in this PR should not be merged as-is.

@ty-everett ty-everett closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant